package org.example.springnetty.MyNetty.outread;

import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelOutboundHandlerAdapter;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.concurrent.TimeUnit;

public class ServerOutReadHandler extends ChannelOutboundHandlerAdapter {
    private static final Logger log = LoggerFactory.getLogger(ServerOutReadHandler.class);
    @Override
    public void read(ChannelHandlerContext ctx) throws Exception {
        log.info("请求读更多的数据,但是我要休息一下");
        TimeUnit.SECONDS.sleep(2);
        super.read(ctx);
    }
}
